<template>
    <div class="withdraw page">
        <cube-scroll
                ref="scroll"
                :data="list"
                :options="options"
                @pulling-up="getFresh"
        >
            <div class="con">
                <div class="userForm">
                    <table class="form">
                        <tr class="formHead">
<!--                            <th>提现人</th>-->
                            <th>提现时间</th>
                            <th>金额</th>
                            <th>状态</th>
                            <!--<th>备注</th>-->
                        </tr>
                        <tr class="formItem" v-for="item in list" :key="item.id">
<!--                            <td class="time">{{item.accName}}</td>-->
                            <td class="money">{{item.crateTime}}</td>
                            <td class="tel">{{item.amount}}</td>
                            <td class="rebate">{{statusType[item.status]}}</td>
                        </tr>
                    </table>
                </div>
            </div>
        </cube-scroll>
    </div>
</template>

<script>
    import {getWithdrawList} from '@/api/order'
    export default {
        name: "withdraw",
        data(){
            return{
                page:1,
                list:[],
                statusType:['待审核','通过','拒绝'],
                options:{
                    pullUpLoad: true
                }
            }
        },
        methods:{
            getFresh(){
                getWithdrawList(this.page).then(res=>{
                    if (this.page==1){
                        this.list = res.data
                    }else {
                        this.list = this.list.concat(res.data)
                    }
                    this.page++
                })
            }
        },
        activated() {
            this.getFresh()
        }
    }
</script>

<style scoped lang="stylus">
.withdraw
    background $page-bg
    .con
        .form
            width 100%
            .formHead
                background-color #f0c808
                color #fff
                font-size 0.35rem
                height 1.41rem
                padding 0 0.20rem
                th
                    height 100%
                    padding 0.53rem 0.27rem
                    vertical-align middle
            .formItem
                color #333333
                font-size 0.27rem
                height 1.33rem
                padding 0 0.20rem
                width 100%
                background-color rgba(153,153,153,.1)
                border-top 1px solid #fff
                td
                    border-right 1px solid #fff
                    height 1.33rem
                    text-align center
                    vertical-align middle


</style>